package com.oneonefive.trainticketsystem.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value ="train")
public class Train{
    @TableId
    private Integer trainId;
    @TableField(value = "start_location")//起始站
    private String startLocation;
    @TableField(value = "end_location")//终点站
    private String endLocation;
    @TableField(value = "departure_time")//出发时间
    private Timestamp departureTime;
    @TableField(value = "arrival_time")//到达时间
    private Timestamp arrivalTime;
    public Train(Integer trainId) {
        this.trainId = trainId;
    }
}
